{% extends 'ApiCloud/Base/layout.common.html.twig' %}

{% block body %}
    {% include "ApiCloud/Base/inc.head.light.html.twig" with {title:"企业信息",back:1} %}
    <div>
        {#3 服务内容#}
        <div class=" bc13 pad5">
            <div class="bcf pad6 round3 bdbda fs9  c11">
                店铺名称
            </div>
            <div class="bcf pad6 round3 bdbda fs9 c12 fs8 c11 lh2">
                <mu-text-field v-model="shop.name" max-length="20" full-width
                               help-text="建议使用与证件内容一致或相关的名称或简称"></mu-text-field>
            </div>
            <div class="bcf pad6 round3 bdbda fs9 mart5 c11 pos-r">
                <div class="flrc">
                    <div class="flex1">地区信息</div>
                    <div class="pad5 fs8" v-if="!isTrue(shop.province)">
                        <span class="c12">未设置</span>
                    </div>
                    <div class="pad5 fs8 tar" v-if="isTrue(shop.province)">
                        {#                    <div class="c01" >已设置</div>#}
                        <div>[[isTrue(shop.province )?shop.province :"未设置"]] / [[isTrue(shop.city )?shop.city :"未设置"]] / [[isTrue(shop.area )?shop.area :"未设置"]]</div>
                    </div>
                    <div class=""><span class="fa fa-angle-right"></span></div>
                    <mu-ripple @click="pcaShowFunc()"></mu-ripple>
                </div>
            </div>
            <div class="bcf pad6 round3 bdbda fs9 mart5 c11 pos-r">
                <div class="flrc">
                    <div class="flex1">地图标注</div>
                    <div class="pad5 fs8" v-if="!isTrue(shop.lat)">
                        <span class="c12">未设置</span>
                    </div>
                    <div class="pad5 fs8 tar" v-if="isTrue(shop.lat)">
                        <div class="c01" >已设置</div>
                        <div class="fs6 c12">[[shop.lat]] / [[shop.lon]]</div>
                    </div>
                    <div class=""><span class="fa fa-angle-right"></span></div>
                    <mu-ripple @click="goto('mapPicker')"></mu-ripple>
                </div>
            </div>
            <div class="bcf pad6 round3 bdbda fs9 mart5 c11">
                地址信息
            </div>
            <div class="bcf pad6 round3 bdbda fs9 c12 fs8 c11 lh2">
                <mu-text-field v-model.sync="shop.address" full-width multi-line :rows="2"
                               max-length="200" :rows-max="4" help-text="请填写准确的企业地址"></mu-text-field>
                <div class="pad5 mart5 bdda fs8" v-if="mapPickerDataShow">
                    <div class="flrc">
                        <div class="flex1">智能提示，点击填入</div>
                        <div class="pos-r"><mu-button small @click="hideFastInput()" icon> <mu-icon value="close"></mu-icon></mu-button></div>
                    </div>
                    <div class="flex-c">
                        <div class="mar3"  v-if="isTrue(mapPickerData.city)"><mu-button @click="setAddress(mapPickerData.city)" small plat full-width>[[mapPickerData.city]]</mu-button></div>
                        <div class="mar3"  v-if="isTrue(mapPickerData.name)"><mu-button @click="setAddress(mapPickerData.name)" small plat full-width>[[mapPickerData.name]]</mu-button></div>
                        <div class="mar3"  v-if="isTrue(mapPickerData.address)"><mu-button @click="setAddress(mapPickerData.address)" small plat full-width>[[mapPickerData.address]]</mu-button></div>
                        <div class="mar3"><mu-button @click="shop.address = ''" small plat full-width>清除</mu-button></div>
                    </div>

                </div>
            </div>
            <div class="bcf pad6 round3 bdbda fs9 mart5 c11">
                客服电话
            </div>
            <div class="bcf pad6 round3 bdbda fs9 c12 fs8 c11 lh2">
                <mu-text-field v-model="shop.phone" max-length="20" full-width
                               help-text="企业固话、手机"></mu-text-field>
            </div>
            <div class="bcf pad6 round3 bdbda fs9 mart5 c11">
                <div class="flrc">
                    <div class="flex1">营业时间</div>
                    <div class="padlr5 c12 fs8">全天</div>
                    <div class=""><span class="fa fa-angle-right"></span></div>
                </div>
            </div>
            <div class="bcf pad6 round3 bdbda fs9 mart5 c11">
                企业介绍
            </div>
            <div class="bcf pad6 round3 bdbda fs9 c12 fs8 c11 lh2">
                <mu-text-field v-model="shop.intro" full-width multi-line :rows="5"
                               max-length="200" :rows-max="8" help-text="简单介绍企业的先关信息"></mu-text-field>
            </div>
        </div>
{#        logo#}
        <div class="pad5 bc13">
            <div class="bcf round3 pad6">
                <div class="flrc fs8 c12">
                    <div class="wh25-25 flcc bdda round3 pos-r">
                         <img :src="picUrl(shop.logo)" alt="" class="wh25-25" v-if="isTrue(shop.logo)" onerror="this.src=pic404">
                         <img :src="picAdd" alt="" class="wh10-10 op5" v-if="!isTrue(shop.logo)" onerror="this.src=pic404">
                        <mu-ripple @click="selectHeadPic()"></mu-ripple>
                    </div>
                    <div class="flex1 lh2 pad5">
                        <div class="c11">企业LOGO</div>
                        <div>1.建议使用工具处理图片</div>
                        <div>2.建议尺寸为600*600</div>
                    </div>
                </div>
            </div>
        </div>
        {#4 图片资料#}
        <div class="pad5 bc13">
            <div class="bcf pad6 round3 bdbda fs9  c11">
                企业相册
            </div>
            <div class="bcf pad6 round3 bdbda fs9 c12 fs8 c11">
                <div class="w100 pos-r" v-for="item,index in pics">
                     <img @click="showPic(index,pics)" :src="item" class="w100 scrollX-Item" alt="" onerror="this.src=pic404">
                    <div class="pos-a r0 t0 flrc op9">
                        <mu-button fab small color="black" @click="move(index,-1)">
                            <mu-icon value="arrow_upward"></mu-icon>
                        </mu-button>
                        <mu-button fab small color="black" @click="move(index,1)">
                            <mu-icon value="arrow_downward"></mu-icon>
                        </mu-button>
                        <mu-button fab small color="black" @click="del(index)">
                            <mu-icon value="close"></mu-icon>
                        </mu-button>
                    </div>
                </div>
                <div class="pos-r pad10 c12 bdso round5 w100 mart5 tac">
                    <mu-ripple @click="selectPic()">+添加图片</mu-ripple>
                </div>
            </div>

        </div>
    </div>

    <div class="pad10">
        <mu-button @click="submit()" large :color="c1" round full-width>确认</mu-button>
    </div>



    <div class="pos-f b0 l0 r0  bcf shadow3" style="height: 50vh;overflow-y: scroll;" v-if="pcaShow">
        <div class="pos-f l0 r0 bcf fs8 c12 lh2 padlr5 bdbso padt6 padb3">
            <div class="list-style-2 flrc">
                <div class="flex1">地区选择器</div>
                <div class="pos-r"><mu-button small @click="pcaShowFunc()" icon> <mu-icon value="close"></mu-icon></mu-button></div>
            </div>
            <div class="flrc tac mart5">
                <div class="flex1" :class="pcaStep == 1?'fwb c13 bc1':''">省份</div>
                <div class="flex1" :class="pcaStep == 2?'fwb c13 bc1':''">城市</div>
                <div class="flex1" :class="pcaStep == 3?'fwb c13 bc1':''">县区</div>
            </div>
        </div>
        <div class="pad5 mart50 c12 fs8 lh2">
            <div v-if="pcaStep == 1">
                <div @click="setP(pIndex,p)" class="pad5 bdbdo pos-r" v-for="p,pIndex in orgData">[[p.name]] <mu-ripple></mu-ripple></div>
            </div>
            <div v-if="pcaStep == 2">
                <div @click="setC(cIndex,c)" class="pad5 bdbdo pos-r" v-for="c,cIndex in pro.sons">[[c.name]] <mu-ripple></mu-ripple></div>
            </div>
            <div v-if="pcaStep == 3">
                <div @click="setA(aIndex,a)" class="pad5 bdbdo pos-r" v-for="a,aIndex in cit.sons">[[a.name]] <mu-ripple></mu-ripple></div>
            </div>
        </div>
    </div>

{% endblock %}

    {% block myJs %}

        <script src="{{ root }}/js/city.js{{ rnd }}"></script>

        <script type="text/javascript" src="{{ root }}/assets/oss/lib/crypto1/crypto/crypto.js"></script>
        <script type="text/javascript" src="{{ root }}/assets/oss/lib/crypto1/hmac/hmac.js"></script>
        <script type="text/javascript" src="{{ root }}/assets/oss/lib/crypto1/sha1/sha1.js"></script>
        <script type="text/javascript" src="{{ root }}/assets/oss/lib/base64.js"></script>
        {#<script type="text/javascript" src="{{ root }}/assets/oss/lib/plupload-2.1.2/js/plupload.full.min.js"></script>#}
        <script type="text/javascript" src="{{ root }}/assets/oss/uploadMy.js{{ rnd }}"></script>


    {% endblock %}
